package com.ethink.framework.common.web.response;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 通用响应对象
 *
 * @param <T>
 * @author yunduo
 */
@Data
public class CommonResponse<T> {

    /**
     * 响应码
     */
    @Schema(description = "响应码", required = true)
    private String code;
    /**
     * 响应信息
     */
    @Schema(description = "响应信息", required = true)
    private String message;
    /**
     * 分页查询数据总数
     */
    @Schema(description = "分页查询数据总数", required = false)
    private Long total;
    /**
     * 响应内容
     */
    @Schema(description = "响应数据内容", required = true)
    private T data;

    @Schema(description = "traceId", required = true)
    private String traceId;

    /**
     * 扩展字段
     */
    @Schema(description = "扩展字段", required = false)
    private Object extension;
}
